using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SampleWarrior : Pawn
{
    public static bool[,] roads;

    static private void AddRoad(int a, int b)
    {
        roads[a, b] = true;
        roads[b, a] = true;
    }
    static SampleWarrior()
    {
        roads = new bool[14, 14];
        AddRoad(0, 1);
        AddRoad(0, 2);

        AddRoad(1, 3);
        AddRoad(1, 4);

        AddRoad(2, 5);
        AddRoad(2, 6);

        AddRoad(3, 7);
        AddRoad(4, 8);
        AddRoad(5, 9);
        AddRoad(6, 10);

        AddRoad(11, 7);
        AddRoad(11, 8);

        AddRoad(12, 9);
        AddRoad(12, 10);

        AddRoad(13, 11);
        AddRoad(13, 12);
    }
    // Start is called before the first frame update
    new void Start()
    {
        base.Start();
    }

    // Update is called once per frame
    new void Update()
    {
        base.Update();
    }



    private bool RangeSelector(int layer, int number)
    {
        if(campIsSelf)
        {
            if (layer >= gridNode.layer
                 && roads[
                    GridManager.GetGridNum(gridNode.layer, gridNode.number),
                    GridManager.GetGridNum(layer, number)])
            {
                return true;
            }
        }
        else
        {
            if (layer <= gridNode.layer
                 && roads[
                    GridManager.GetGridNum(gridNode.layer, gridNode.number),
                    GridManager.GetGridNum(layer, number)])
            {
                return true;
            }
        }
        return false;
    }
}
